package com.example.basic.demos.exception;

public enum ErrorEnum {

    SUCCESS(200, "请求成功"), BODY_NOT_MATCH(400, "请求数据格式不对"), INTERNAL_SERVER_ERROR(500, "服务器错误");

    /*状态码*/
    private final Long code;

    /*错误信息*/
    private final String msg;

    ErrorEnum(long code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Long getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
